package cn.iocoder.yudao.module.erp.controller.admin.product.vo.productPrice;

import cn.iocoder.yudao.module.erp.dal.dataobject.product.ErpProductPriceDO;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - ERP 产品新增/修改 Request VO")
@Data
public class ProductPriceSaveReqVO {

    @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15672")
    private Long id;

    @Schema(description = "产品价格list", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<ProductPriceItem> productPriceList;


    @Data
    @Schema(description = "订单清单列表 Item")
    public static class ProductPriceItem {

        /**
         * 产品编号
         */
        @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1234567890123")
        private Long id;
        /**
         * 采购价格，单位：元
         */
        @Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "2025-05-26")
        @NotNull(message = "价格不能为空")
        private BigDecimal price;

        @Schema(description = "有效期开始时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2025-05-26")
        @NotNull(message = "有效期开始时间不能为空")
        private LocalDateTime startTime;

        @Schema(description = "有效期结束时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2025-05-26")
        @NotNull(message = "有效期结束时间不能为空")
        private LocalDateTime endTime;

    }


}
